<?php
namespace app\api\controller;
// namespace app\zw_admin\controller;
use \think\Controller;
use think\Db;
// use think\Controller;
use think\Session;
use think\Request;
use Endroid\QrCode\Tests;
use qrcode;
use alisms\SmsDemo;
class BankController extends Controller
{

    /**
     * 信用卡申请
     * @return [type] [description]
     */
    public function bank_add()
    {
        $uid = input('param.uid');
        $member_list = db('member')->where(['uid'=>$uid])->find();
        $list['phone'] = $member_list['phone'];
        $list['age'] = input('param.age')?input('param.age'):'0';
        $list['uname'] = input('param.uname')?input('param.uname'):'';
        $list['address'] = input('param.address')?input('param.address'):'';
        $list['interest'] = input('param.interest')?input('param.interest'):'';
        $list['house'] = input('param.house')?input('param.house'):'0';
        $list['wages'] = input('param.wages')?input('param.wages'):'0';
        $list['public'] = input('param.public')?input('param.public'):'0';
        if (db('bank')->insert($list) > 0) {
            echo json_encode(array("status"=>1,'message'=>'申请成功!',"data"=>$list));
            exit;
        }else{
            echo json_encode(array("status"=>2,'message'=>'申请失败!',"data"=>[]));
            exit;
        }
    }







    
}
